package com.hsgene.user.dto.login;

import com.hsgene.user.dto.other.UserExtensionInfoDto;

import java.io.Serializable;

/**
 * 登录信息
 *
 * @author wangbing
 * @version 1.0, 2018/7/2
 */
public class LoginDto implements Serializable {
    private static final long serialVersionUID = 5938284679378588582L;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 登录短信验证码
     */
    private String smsCode;

    /**
     * 登录端别（来源类型：APP,WEB,wechat_application等）
     */
    private String sourceType = "APP";

    /**
     * 用户登录IP地址
     */
    private String loginIp;

    /**
     * 用户拓展信息（设备信息）
     */
    private UserExtensionInfoDto extensionInfo;

    /**
     * 是否检查短信验证码
     */
    private boolean checkSmsCode = true;

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public UserExtensionInfoDto getExtensionInfo() {
        return extensionInfo;
    }

    public void setExtensionInfo(UserExtensionInfoDto extensionInfo) {
        this.extensionInfo = extensionInfo;
    }

    /**
     * 是否需要校验短信验证码
     *
     * @return true：需要校验
     */
    public boolean needCheckSmsCode() {
        return checkSmsCode;
    }

    public void setCheckSmsCode(boolean checkSmsCode) {
        this.checkSmsCode = checkSmsCode;
    }
}
